/* 个人信息页面样式 */
.profile-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

/* 侧边导航 */
.profile-sidebar {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.user-card {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.avatar-upload {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.user-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: opacity 0.3s ease;
}

.avatar-upload:hover .upload-overlay {
    opacity: 1;
}

.user-nickname {
    color: var(--primary-color);
    margin: 10px 0;
}

.user-id {
    color: var(--icon-color);
    font-size: 0.9em;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
}

.sidebar-menu li {
    margin: 8px 0;
}

.sidebar-menu a {
    display: block;
    padding: 12px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu .active a {
    background: var(--input-bg);
    color: var(--primary-color);
}

/* 主内容区 */
.profile-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.info-section {
    display: none;
}

.info-section.active {
    display: block;
}

.info-section h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

/* 表单组件 */
.profile-form {
    display: grid;
    gap: 20px;
}

.dual-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--icon-color);
}

.input-with-action {
    position: relative;
}

.input-with-action input {
    width: 100%;
    padding: 12px 100px 12px 15px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.edit-btn,
.change-btn,
.certify-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.edit-btn:hover,
.change-btn:hover {
    background: var(--secondary-color);
}

/* 性别选择 */
.gender-select {
    display: flex;
    gap: 20px;
    padding-top: 10px;
    /*align-content: space-between;*/
}

.gender-option {
    padding: 6px 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gender-option:hover,
input:checked + .gender-option {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* 安全设置 */
.security-list {
    display: grid;
    gap: 15px;
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--input-bg);
    border-radius: 8px;
}

.item-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 教师认证 */
.certification-status {
    text-align: center;
    padding: 40px;
    background: var(--input-bg);
    border-radius: 12px;
}

.certification-status i {
    font-size: 3em;
    color: var(--icon-color);
    margin-bottom: 15px;
}

.certify-btn {
    padding: 12px 30px;
    background: var(--success-color);
    color: white;
    border-radius: 20px;
    font-size: 1.1em;
}

@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
    }

    .dual-column {
        grid-template-columns: 1fr;
    }
}

/* 新增社交绑定样式 */
.social-badge {
    padding: 8px 15px;
    border-radius: 20px;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-badge.bound {
    border: 1px solid var(--success-color);
}

.social-badge i {
    font-size: 1.2em;
    color: var(--icon-color);
}

.social-badge.bound i {
    color: var(--success-color);
}

.floating-submit {
    position: sticky;
    bottom: 10px;
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(108,92,231,0.3);
    animation: float 3s ease-in-out infinite;
}

.pulse-effect {
    animation: pulse 0.3s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 侧边栏退出登录按钮专属样式 (ฅ>ω<ฅ) */
.profile-sidebar > button {
    /* 基础样式 */
    width: calc(100% - 40px); /* 留出左右边距 */
    margin: 5px 20px 0;      /* 与上方菜单保持距离 */
    padding: 12px 0;
    background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%); /* 渐变警示红 */
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 1px;   /* 增加字母间距 */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(255, 71, 87, 0.15);

    /* 布局定位 */
    position: relative;
    overflow: hidden;         /* 用于伪元素动画 */
}

/* 鼠标悬停特效 */
.profile-sidebar > button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(255, 71, 87, 0.25);
    background: linear-gradient(135deg, #ff6b81 0%, #ff4757 100%); /* 反转渐变方向 */
}

/* 点击动效 (๑>ᴗ<๑) */
.profile-sidebar > button:active {
    transform: scale(0.98);
    box-shadow: 0 2px 4px rgba(255, 71, 87, 0.2);
}

/* 适配暗黑主题 (≧∇≦)ﾉ */
.dark-theme .profile-sidebar > button {
    background: linear-gradient(135deg, #e84118 0%, #c23616 100%);
    box-shadow: 0 4px 6px rgba(232, 65, 24, 0.15);
}

/* 密码修改表单 */
.password-form {
    padding: 20px;
    background: var(--input-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.password-form .form-group {
    margin-bottom: 25px;
}

.password-form label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 500;
}

.password-form .input-with-icon {
    position: relative;
}

.password-form .input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--icon-color);
}

.password-form input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.password-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}


